import request from "../request/index";

const baseUrl = process.env.VUE_APP_BASE_URL;

export function QueryUser(pageIndex, pageSize) {
  return request.post(
    `${baseUrl}/User/QueryUser`,
    {
      name: "",
      phone: "",
    },
    {
      pageIndex: pageIndex,
      pageSize: pageSize,
    }
  );
}
export function GetUser(id) {
  return request.get(`${baseUrl}/User/GetUser?id=${id}`);
}

export function UpdateUser(user) {
  return request.post(`${baseUrl}/User/UpdateUser`, user);
}

export function AddUser(user) {
  return request.post(`${baseUrl}/User/AddUser`, user);
}

export function DeleteUser(user) {
  return request.post(`${baseUrl}/User/DeleteUser`, user);
}
export function ResetPassword(id) {
  return request.get(`${baseUrl}/User/ResetPassword?id=${id}`);
}
